#include "basic_fun.h"
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

void generate_array(int* array, int count)
{
	int n = 0;
	srand(time(NULL));
	for (n = 0; n < count; n++)
	{
		array[n] = rand() % 100;
	}
}

void do_sort(int* array, int count, SORT_FUN sort_fun)
{
	printf("befor sort:\n");
	print_array(array, count);

	printf("sorting\n");
	sort_fun(array, count);

	printf("after sort:\n");
	print_array(array, count);
}

void print_array(int* array, int count)
{
       int n = 0;
       for (n = 0; n < count; n++)
       {
               printf("[%d]=%d\n", n, array[n]);
       }
       return;
}
